package com.ls.cloud.auth.controller;

import com.ls.cloud.auth.service.AuthUserService;
import com.ls.cloud.common.ResultData;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: candy33
 * @Date: 2022/05/04 13:11
 * com.ls.cloud.auth.controller
 */
@RestController
@RequestMapping("/auth/")
public class AuthUserController {

    private final AuthUserService userService;

    public AuthUserController(AuthUserService userService) {
        this.userService = userService;
    }

    @GetMapping("/login")
    public ResultData login(String username, String password) {
        return userService.login(username, password);
    }
}
